
Task = function(spec) {
    $.extend(this, spec);
    this.schedule = new Schedule({ before: this.before, after: this.after });
};

Task.prototype = {
    type: 'Task'
};

Task.parse = function(task) {
    if (task.type == Task.prototype.type) {
        return task;
    }
    return new Task(task);
};
